<?php 
include("../../conexion.php");
$tipoper=$_POST['tipoper'];
$numdoc=$_POST['numdoc'];

$sqlclie=mysql_query("select * from cliente where  numdoc = '$numdoc' and tipper = '$tipoper'", $conn) or die(mysql_error());
$row=mysql_fetch_array($sqlclie);
if (!empty($row)){
	 if ($row['tipper']=="N"){
		 include("../view/mostrarclientelib.php");
		}else{ 
		  include ("../view/mostrarempresalib.php");} 
}else{
    if ($tipoper!="N"){
	  echo"<span style='font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 16px;'>No se encontro la empresa :</span> <a onClick='newclientempresa()'><img src='../../iconos/newcliente.png' width='134' height='28' border='0'></a>"; 
	 }else{
	  echo"<span style='font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 16px;'>No se encontro al cliente :</span><a onClick='newclient()'> <img src='../../iconos/newcliente.png' width='134' height='28' border='0'></a>";
	 }
}

?>
